public abstract class Colleague {
    //同事类
    protected Mediator mediator;

    public Colleague(){ //无参构造
    }

    public Colleague(Mediator mediator){ //有参构造
        this.mediator = mediator;
    }

    public abstract void stringProcess(String message);

    //定义依赖方法，与中介者进行通信
    public void interactWithMediator(String message) {
        mediator.operation(message);
    }

}
